//react es6 基本语法
var React = require("react");
var styles = require("./HelloMsg.css");
var {DatePicker} = require("antd");
var {Toast} = require("react-weui");
import 'antd/dist/antd.less';
import 'weui';
import 'react-weui/lib/react-weui.min.css';

class HelloMsg extends React.Component{
    constructor(props){
        super(props);
        console.info("属性：");
        console.info(props);
        this.state = {
            name:this.props.name,
            showLoading:false
        };
    }
    componentWillMount(){
        console.info("componentWillMount");

    }
    componentDidMount(){
        debugger;
        console.info("componentDidMount");
        this.setState({name:"大刚",showLoading:true});

    }
    render(){
        console.info("render");
        return <div className={styles.s1}>hello {this.state.name}!
            <div style={{"padding":"10px"}}>
                <DatePicker></DatePicker>
            </div>
            <div>
                <Toast icon="loading" show={this.state.showLoading}>Loading...</Toast>
            </div>
        </div>
    }
}
module.exports = HelloMsg;